Tips: Be Careful When Adding Currency Field to An Entity

Recently I got a weird issue when I’m trying to migrate the configuration data from the Dev environment to the other environment. I’m using the Dynamics CRM SDK’s ConfigurationMigration Tool to move these configuration records.

Apparently this is the error message that I received:

Error Message

Below is the import log:


** IMPORT TO CRM PROCESS LOG
** Log Start: 06/05/2015 09:28:35

Log started at : 9:28:35 AM
9:28 AM New Progress Event – Result: True – Entity: unknown – Parsing import data file
9:28 AM Progress Event – Result: True – Entity: unknown – Parse Complete
9:28 AM New Progress Event – Result: True – Entity: unknown – Beginning Import To CRM.. Importing 3 entities – 42 records
9:28 AM New Progress Event – Result: True – Entity: unknown – Running Schema Validation
9:28 AM Schema Validation – Result: True – Entity: ALL – Validating 4 Entities
9:28 AM Schema Validation – Result: False – Entity: (myconfigentity) – Missing Fields: transactioncurrencyid , transactioncurrencyid , exchangerate 
9:28 AM Progress Event – Result: True – Entity: unknown – Schema Validation failed for Missing fields on Entities, See log for missing fields
9:28 AM Progress Event – Result: True – Entity: unknown – Import Process completed
Log ended at : 9:28:35 AM

I’m spending some time in comparing the schema of my DEV and TEST environment, both of the environments has the same version of the customization solution, however what I’ve found is that in my DEV environment, I do have 2 rogue fields (transactioncurrencyid and exchangerate) for the failing entity, whereas in my TEST environment these 2 fields do not exist.

TransactionCurrencyId

The reason of this entity has these fields is because during the development of the entity I added a currency field that no longer needed when I have the clarity of the requirements and removed it before the solution made into our TEST environment. These fields cannot be removed on my DEV environment due to the nature of the automation of creation by the system.

So for my workaround in my scenario would be excluding these fields on the ConfigurationMigration Schema. I hope these rogue fields won’t add further implications because it can’t be removed, and I hope the system could automatically clean up the transactioncurrencyid and exchangerate fields when there is no Currency field at all in the entity.

Leave a comment